package com.payment.notify.config;

import java.util.Map;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import com.google.common.collect.Maps;
import com.payment.notify.dto.NotifyParam;

/**
 * 类名：NotifyConfig.java<br>
 * 描述：消息通知参数配置<br>
 * 创建者：XINJF<br>
 * 创建日期：2018年4月24日下午1:57:56<br>
 * 版本：1.0<br>
 * 修改者：<br>
 * 修改日期：<br>
 */

@Configuration
@ComponentScan("com.payment.notify.*")
public class NotifyConfig {
	
	@Bean
	public NotifyParam initNotifyParam() {
		final Map<Integer, Integer> notifyParams = Maps.newHashMap(); //通知时间次数map
		notifyParams.put(1, 0);
		notifyParams.put(2, 1);
		notifyParams.put(3, 2);
		notifyParams.put(4, 5);
		notifyParams.put(5, 15);
		final String successValue = "success";
		final NotifyParam entity = new NotifyParam();
		entity.setNotifyParams(notifyParams);
		entity.setSuccessValue(successValue);
		return entity;
	}

}
